﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TienTeTuong
{
    public partial class Home : System.Web.UI.Page
    {
        public List<CategoryDetailDTO> lstHotCateDetail = new List<CategoryDetailDTO>();
        CategoryDetailBUS cateDetailBUS = new CategoryDetailBUS();
        ArticleBUS articleBus = new ArticleBUS();
        public List<ArticleDTO> lstArticle = new List<ArticleDTO>();
       // private const int topProduct = 4;
       // private const int topArticle = 4;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Common.CheckisActiveSite())
            {
                lstHotCateDetail = cateDetailBUS.GetHotListCategoryDetail(Common.numTopHotProductDetail);
                lstArticle = articleBus.GetArticleByViewed(Common.numTopArticle);
            }
            else
            {
                Response.Redirect("Default.aspx");
            }
            
        }
    }
}